<!DOCTYPE html>
<html>
	<head>		
		<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
		<link rel="icon" href="http://wechat.monmondecake.com/monmomde/cakewap/images/favicon.ico" type="image/x-ico"/>
		<meta charset="UTF-8">
		<style type="text/css">
			*{padding:0px;margin:0px;color: #6F6F6F;font-weight: bold;font-size: 14px;}
			header{height: 62px;text-align: center;line-height: 62px;font-size: 16px;magin-left:50%;}
			header span{margin-left: 5px;}
			table{width: 90%;margin: 0 5%;border-top: 1px solid #000;border-left: 1px solid #000;border-collapse: collapse;word-break: break-all;word-wrap: break-word;}
		    tr{display: table-row;vertical-align: inherit;border-color: inherit;height: 20px;line-height:20px ;}
		    table td,table th{padding: 1.5mm;border-bottom: 1px solid #000;border-right: 1px solid #000;text-align: left;empty-cells: show;word-break: break-all;}
		    table td{color: #000000;font-weight: bold;}
		    p{width: 90%;margin: 0 5%;margin-top: 5px;line-height: 35px;height: 35px;clear: both;}
		    p span{margin-right: 100px;}
			.fr{float: right;}
		</style>
	</head>
	<body>	
	    <header><p>Dear all:</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;现订单统计信息如下:</p></header>	
		<section>
			<table>
			    <tr><th colspan="12" style="text-align: center;">${preDayTime} -- ${nowDayTime}<span>订单统计</span></th></tr>
				<tr>
					<th>序号</th>
					<th>订单编号</th>
					<th>订单编码</th>
					<th>商品名称</th>
					<th>商品编码</th>
					<th>商品类型</th>
					<th>订单类型</th>
					<th>订单金额</th>
					<th>支付金额</th>
					<th>商品尺寸</th>
					<th>商品重量</th>
					<th>商品数量</th>
				</tr>
				<#list orderList as order> 
					<#list order.goodsList as detail> 
					 <tr>
						<#if detail_index=0>
							<td rowspan=${order.goodsList?size}>${order_index+1}</td>
							<td rowspan=${order.goodsList?size}>${order.id}</td>
							<td rowspan=${order.goodsList?size}>${order.orderCode}</td>
						</#if>
						
						<td>${detail.goodsName}</td>
						<td>${detail.goodsCode}</td>
						<td>
							<#if detail.goodsType==0>商品</#if>
							<#if detail.goodsType==1>配件</#if>
						</td>
						
						<#if detail_index=0>
						    <td rowspan=${order.goodsList?size}>
							   <#if order.orderType==0>普通订单</#if>
							   <#if order.orderType==1>企业订单</#if>
							   <#if order.orderType==2>试吃订单</#if>
							   <#if order.orderType==3>免单订单</#if>
						    </td>
							<td rowspan=${order.goodsList?size}>#{order.totalAmount;m2M2}</td>
							<td rowspan=${order.goodsList?size}>#{order.payAmount;m2M2}</td>
						</#if>
						
						<td>${detail.goodsSize}</td>
						<td>${detail.goodsWeight}</td>
						<td>${detail.goodsNumber}${detail.goodsUnits}</td>
						
					 </tr>
					</#list> 
				</#list> 
			</table>
			
		</section>
		<p>
		   <span class="fr">支付总额：#{payAmountSum;m2M2}</span>
		   <span class="fr">订单总额：#{totalAmountSum;m2M2}</span>
		   <span class="fr">商品总数：${goodsNumberSum}</span>
		   <span class="fr">订单总数：${orderList?size}</span>
		</p>
	</body>
</html>